package com.datang.springcode.propertySourceAndValue;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Lamp {

    public String driver;

    @Value("${db.url}")
    public String url;

    public Lamp(@Value("${db.driver}") String driver) {
        this.driver = driver;
    }
}
